package com.enum_;

/**
 * @Author 小闽
 * @Date 2024/9/21 15:51
 * @PackageName: com.enum_
 * @ClassName: EnumExercise01
 * @Description: 枚举课堂练习
 * @Version 1.0
 */
public class EnumExercise01 {
    public static void main(String[] args) {
        Gender2 boy = Gender2.BOY;
        Gender2 boy2 = Gender2.BOY;
        System.out.println(boy);
        System.out.println(boy2==boy);

    }
}

enum Gender2 {
    BOY,
    GIRL;
    public String toString(){
        return name();
    }
}